<template>
  请输入姓名：<input type="text" v-model="username">
  <div>姓名是：{{ username }}</div>
  <input type="text" v-model.number="n1" /> + <input type="text" v-model.number ="n2" />
  = {{ n1 + n2 }}
</template>

<script setup>
import { ref } from 'vue'
const username = ref('zhangsan')
const n1 = ref(1)
const n2 = ref(2)
</script>
 